package com.cssw.fyzb.busi.service.live;

import com.cssw.fyzb.core.model.dodb.CmfGift;
import com.cssw.fyzb.core.model.dodb.GiftLog;
import com.ydn.dbframe.plugin.activerecord.Page;
import com.ydn.dbframe.plugin.activerecord.Record;

import java.math.BigDecimal;

/**
 * @author wangj
 */
public interface GiftService {

    /**
     * 查询单个礼物配置
     *
     * @return
     */
    CmfGift queryById(Long giftId);

    /**
     * 获取礼物列表
     *
     * @return
     */
    public Page<CmfGift> listGift(int pageNumber, int pageSize);

    /**
     * 赠送礼物
     *
     * @param fromUserId
     * @param toUserId
     * @param liveId
     * @param giftId
     * @return
     */
    void sendGift(Long fromUserId, Long toUserId, Long liveId, Long giftId);

    //添加礼物日志
    Long addSendGiftLog(Long fromUserId, Long toUserId, Long liveId, Long giftId, BigDecimal fCoin, BigDecimal yCoin);

    //添加日志
    Long addGiftLog(Long userId, Long giftId, String type, Integer nums, String tradeId, String tradeType, String tradeName);

    /**
     * 用户礼物日志
     *
     * @return
     */
    public Page<GiftLog> listGiftLog(Long userId, Integer pageNumber, Integer pageSize);

    /**
     * 主播收到礼物列表
     *
     * @return
     */
    public Page<CmfGift> listReceivedGift(Long userId, Integer pageNumber, Integer pageSize);

    /**
     * 用户赠送礼物列表
     *
     * @return
     */
    public Page<CmfGift> listSendGift(Long userId, Integer pageNumber, Integer pageSize);

    /**
     * 主播收到礼物统计(根据礼物id)
     *
     * @return
     */
    public Page<Record> receivedGiftStatistics(Long userId, Integer pageNumber, Integer pageSize);
}
